-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add active content warning in jQuery mode #467
Conversation
@mossroy I've now tested and debugged this PR in Edge, Firefox ESR, FFOS Simulator, Chromium 66, and IE11 on Windows. It's ready for review. |
I quickly tested on Firefox 60 ESR and Chrome 71 : it worked very well ! |
@mossroy I believe remaining issues with this PR are either resolved or pushed to the two new issues I have created. Let me know, by approving the PR, whether it's ready to be squashed/merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this can be squashed/rebased/merged
e179c98
to
58c2d2b
Compare
This is a first go at addressing #466. I have backported the UI features and detection of the active content warning from Kiwix JS Windows. It intelligently detects an unsupported UI and puts a yellow Bootstrap
alert-warning
just below the search box. The alert is only shown on the landing page (otherwise it would become very annoying), and is removed when the user presses Config or searches for articles. By default, it will appear again whenever the user goes back to a landing page with active content.The alert can be dismissed temporarily (with the x) or permanently. Hyperlinks to the appropriate settings on the Config page are provided (to activate SW mode, and to hide the warning permanently), and these hyperlinks jump to (and highlight) the setting the user needs to activate. The highlighting feature is backported from Kiwix JS Windows where it is maybe more useful because there are a lot more options that can be confusing. However, it still seems useful here, and educates the user about the Config settings. It also will become more useful as display settings are added.
I've taken the liberty of including a small bit of related code that is part of the same UI feature set in Kiwix JS Windows. It responsively changes the colour of the API status panel from yellow
panel-warning
(when the SW API is unavailable or unregistered) to greenpanel-success
when the SW API is available and registered. I think this makes things clearer for the user and is aesthetically pleasing.